<%-- 
    Document   : autorizar
    Created on : 27/02/2010, 11:31:05 AM
    Author     : Cristian
--%>

<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<%@taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<f:view>
    <link href="/general/css/admin_1.css" rel="stylesheet" type="text/css"/>
    <t:div>
        <h:form>
            <br>
            <h:panelGrid columns="1" width="100%" styleClass="tablaprincipal">
                <h:outputLabel value="Numeracion de Certificados" />
            </h:panelGrid>
            <h:inputHidden value="#{RecepAutoCertController.inicio}"/>
            <a4j:outputPanel ajaxRendered="true">
                <h:messages id="lblMessages" styleClass="messages" infoClass="infoClass" errorClass="errorClass"
                            warnClass="warnClass" fatalClass="fatalClass" showDetail="true" errorStyle="color:red;"
                            warnStyle="color:green;" infoStyle="color:black;" fatalStyle="color:black"/>
            </a4j:outputPanel>
            <a4j:outputPanel id="panel" ajaxRendered="true">
                <h:panelGrid columns="2" styleClass="fondoFormulariosyPanel">
                    <h:outputLabel value="DNI " />
                    <h:panelGrid columns="2" styleClass="fondoFormulariosyPanel">
                        <h:inputText id="txtDni" value="#{RecepAutoCertController.persona.perNroDNI}" maxlength="8" />
                        <a4j:commandButton value="Buscar" action="#{RecepAutoCertController.buscar}" title="buscar" reRender="panel" />
                    </h:panelGrid>
                    <h:outputLabel value="Apellido Paterno "/>
                    <h:inputText id="txtPaterno" value="#{RecepAutoCertController.persona.perapellidoPaterno}" size="40"/>
                    <h:outputLabel value="Apellido Materno "/>
                    <h:inputText id="txtMaterno" value="#{RecepAutoCertController.persona.perapellidoMaterno}" size="40"/>

                    <h:outputLabel value="Nombres " />
                    <h:inputText id="txtNombres"  value="#{RecepAutoCertController.persona.perNombres}" size="40"/>
                </h:panelGrid>
                <br/>
                <h:commandButton value="Grabar" action="#{RecepAutoCertController.grabar}" />
                <rich:dataTable value="#{RecepAutoCertController.recepcionadores}" var="rec" rows="8" reRender="ds" id="simpletable"
                                width="70%" columnsWidth="45%, 25%, 15%, 15%" rowClasses="TableImpar,TablePar">
                    <f:facet name="header">
                        <rich:datascroller id="ds" renderIfSinglePage="false"></rich:datascroller>
                    </f:facet>
                    <rich:column>
                        <f:facet name="header"> <h:outputLabel value="Recepcionador" /></f:facet>
                        <h:outputText value="#{rec.fkSolCodigopna.nombreCompleto}"></h:outputText>
                    </rich:column>
                    <rich:column>
                        <f:facet name="header"> <h:outputLabel value="Fecha de Registro" /></f:facet>
                        <h:outputText value="#{rec.rceFechregistro}"></h:outputText>
                    </rich:column>
                    <rich:column>
                        <f:facet name="header"> <h:outputLabel value="Activo" /></f:facet>
                        <h:selectBooleanCheckbox value="#{rec.rceVigente}"></h:selectBooleanCheckbox>
                    </rich:column>
                    <rich:column>
                        <f:facet name="header"> <h:outputLabel value="OPCIONES" /></f:facet>
                        <a4j:commandLink action="#{RecepAutoCertController.editar}" value="Editar" reRender="panel">
                            <f:setPropertyActionListener target="#{RecepAutoCertController.recepSeleccionado}" value="#{rec}" />
                        </a4j:commandLink>
                    </rich:column>
                </rich:dataTable>
            </a4j:outputPanel>
        </h:form>
    </t:div>
</f:view>
